(function(angular) {
	'use strict';
	angular.module('fs.waf').factory('eventWfService', eventWfService);
	eventWfService.$inject = [ '$q', '$timeout', 'loggerFactory', 'commonService', 'ajaxServiceFactory', 'modalService', 'gridService', 'arithService' ];
	function eventWfService($q, $timeout, loggerFactory, commonService, ajaxServiceFactory, modalService, gridService, arithService) {
		var log = loggerFactory.getLogger("eventWfService"), ajaxService = ajaxServiceFactory.buildAjaxService({
			getWfTasktypeOptions : {
				url : 'do/cda/dataList/eventWfTasktypeOptions',
				method : 'get'
			},
		});
		
		function initSearchOptions($scope, ctrl) {
			var defer = $q.defer();
			ctrl.wfStatusCodeOptions = getWfStatusCodeOptions().data;
			ajaxService.getWfTasktypeOptions().then(function(response) {
				ctrl.wfTasktypeOptions = response.data;
				defer.resolve();
			});
			return defer.promise;
		}
		
		function getWfStatusCodeOptions() {
			var option = {
					"data" : [{
						"value" : "LOG",
						"label" : "label.eventwf.wfstatuscode.log"
					}]
			};
			return option;
		}
		
		return {
			initSearchOptions : initSearchOptions,
		};
	}
})(angular);